<?php 
$conn = mysql_connect("127.0.0.1","root","");
mysql_select_db("xingtan");
$name = mysql_real_escape_string($_GET['n']);
$id = mysql_real_escape_string($_GET['id']);
$url = mysql_real_escape_string($_GET['u']);
$title = mysql_real_escape_string($_GET['t']);
$sql = "INSERT INTO authors (id, name, title, url) VALUES (" . $id . ",'" . $name . "','" . "$title" . "','" . $url . "');";
if ($title && $name && $url) {
  mysql_query($sql);
  print 'insert ' . $id . ' ok : ' . $result . $sql;
} else {
  print 'para error';
}
mysql_close($conn);
?>
